﻿<!DOCTYPE HTML>
<html>
<head>
    <title>Home</title>
    <!-- Custom Theme files -->
    <link href="@Url.Content("~/Assets/css/styleForLogin.css")" rel="stylesheet" />
    <!-- Custom Theme files -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Login form web template, Sign up Web Templates, Flat Web Templates, Login signup Responsive web template, Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />

</head>
<body style="background-image:url(@Url.Content("~/Assets/img/banner.jpg"))">
    <div class="login">
        <h2 style="font-family:'宋体'">科室管理平台</h2>
        <div class="login-top">
            <form  action="@Url.Action("Login", "Home")" method="POST">
                <label >请输入用户名：</label><br/>
                <input name="tb_UserName" style="margin-top: 8px;height: 10px;" type="text" value="" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}">
                <label>请输入密码：</label><br/>
                <input  name="tb_UserPassword"  style="margin-top: 8px;height: 10px;" type="password" value="" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}">
                <label>请选择登录方式：</label><br/>
                <select id="select_LoginType" onchange="GoToIndex()" style="height: 20px;margin-top: 8px;color:black;width: 200px" id="select_LoginType" name="select_LoginType" >
                    <option value="1">表单登录</option>
                    <option value="0">域登录</option>
                    <option value="2" >匿名登录</option>
                </select>
                <br/><br/>
                <label style="color:brown;margin-top: 8px" id="lb_LoginOff">
                                   
                </label>
                <div class="forgot">
               
                <input type="submit" value="登录">
            </div>
            </form>
            
        </div>
    </div>
    <div class="copyright">

    </div>
    
    
     <script src="~/Assets/vendor/js/jquery-1.7.1.js"></script>
        <script>
        function GoToIndex()
        {
            //alert($("#select_LoginType").val());
            if ($("#select_LoginType").val()=="0") {
                window.location.href = '@Url.Action("Index","Home")';
            }

            else if ($("#select_LoginType").val() == "2")
            {
                window.location.href = '@Url.Action("Index","Home")' + "?type=anonymity";
            }
            //window.location.href = '@Url.Action("Index","Home")' + "?type=anonymity";
        }

        $(document).ready(function ()
        {
            if ('@ViewBag.Flag'.length!=0)
            {
                if ('@ViewBag.Flag' == 'Active')
                {
                    alert('已激活');
                }
                if ('@ViewBag.Flag' == 'False')
                {
                    alert('该账户已经激活');
                }
                if ('@ViewBag.Flag' == 'LoginOff')
                {
                    $("#lb_LoginOff").html("密码错误！");
                }
                
            } else
            {
                $("#lb_LoginOff").html("");
            }
            
        });

    </script>
    
   

</body>
</html>
